import request from '@/utils/request'
// 注册
export const postrRegister = (data) => {
  return request({
    url: '/h5/user/register',
    method: 'post',
    data
  })
}
// 登录
export const postLogin = (data) => {
  return request({
    url: '/h5/user/login',
    method: 'post',
    data
  })
}
// 获取详情列表
export const getQuery = (params) => {
  return request({
    url: '/h5/interview/query',
    params: {
      current: params.current || 1,
      pageSize: params.pageSize || 10,
      sorter: params.sorter
    }
  })
}
// 获取单个页面详情
export const getShow = (id) => {
  return request({
    url: '/h5/interview/show', method: 'get', params: { id }
  })
}

// 获取收藏详情
export const postOpt = (id, optType) => {
  return request({
    url: '/h5/interview/opt',
    method: 'post',
    data: {
      id,
      optType
    }
  })
}
// 获取收藏详情
export const getoptList = (optType) => {
  return request({
    url: '/h5/interview/opt/list',
    method: 'get',
    params: {
      optType: optType,
      pageSize: 1000,
      page: 1
    }
  })
}
// 获取个人详情
export const getCurrentUser = () => {
  return request({
    url: '/h5/user/currentUser',
    method: 'get'

  })
}
